package Fiest_01.second;

public class three {
    private int a;
    private int b;
    private double c;
    private double d;
    private String e;
    private String f;
    private int g;
    public three(){}
    public three(int a,int b,double c,double d,String e,String f,int g){
        this.a=a;
        this.b=b;
        this.c=c;
        this.d=d;
        this.e=e;
        this.f=f;
        this.g=g;
    }
    public void setA(int a){
        this.a=a;
    }
    public int getA(){
        return a;
    }
    public void setB(int b){
        this.b=b;
    }
    public int getB(){
        return b;
    }
    public void setC(double c){
        this.c=c;
    }
    public double getC(){
        return c;
    }
    public void setD(double d){
        this.d=d;
    }
    public double getD() {
        return d;
    }
    public void setE(String e){
        this.e=e;
    }
    public String getE() {
        return e;
    }
    public void setF(String f){
        this.f=f;
    }
    public String getF() {
        return f;
    }
    public void setG(int g){
        this.g=g;
    }
    public int getG(){
        return g;
    }
    public void zhengshu(){
        System.out.println("相加的和是:"+(a+b));
    }
    public void xiaoshu(){
        System.out.println("小数相加的和是："+(c+d));
    }
    public void zifuchuan(){
        System.out.println("字符串相加的和是："+(e+f));
    }
    public void sum(){
        int sum=0;
        for (int i = 1; i <=g ; i++) {
            sum+=i;
        }
        System.out.println("1到"+g+"的整数和是："+sum);
    }

}
